<template>
   <el-button type="primary" @click="goBack">
      <slot>返回</slot>
   </el-button>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

let router = useRouter();

//返回上一页
const goBack = () => {
    router.back();
}

</script>

<style scoped>

</style>